<%-- 
    Document   : feedView
    Created on : Nov 6, 2009, 3:31:48 PM
    Author     : Phong
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" import="java.sql.*,DAOClass.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
            feedback feed = new feedback();
            int id;
            ResultSet listFeed = null;
            listFeed = feed.getFeedback();
            String status;
        %>
            <table width="753" border="1">
                <thead>
                    <tr>
                        <th width="216">Date Send</th>
                        <th width="122">Email</th>
                        <th width="294">Title</th>
                        <th width="42">Status</th>
                        <th width="45">Delete</th>
                    </tr>
                </thead>
                <tbody>
                    <%
            while (listFeed.next()) {                
                if (listFeed.getInt("Status") == 0) {
                    status = "../images/button/system/16-em-check_1.png";
                } else
                    status = "../images/button/system/16-em-cross.png";
                    %>

                    <tr>
                        <td>
                        <%=listFeed.getString("DateSend")%></td>
                        <td><a href="mailto:<%=listFeed.getString("Email")%>"><%=listFeed.getString("Email")%></a></td>
                        <td>
                            <a href="FeedViewDetail.jsp?id=<%=listFeed.getInt("FeedBackID")%>">
                        <%=listFeed.getString("Title")%>
                            </a>
                        </td>
                        <td align="center"><img src="<%=status%>" border="0" alt="Delete"></td>
                        <td align="center"><a href="include/del_feedback.jsp?d=<%=listFeed.getInt("FeedBackID")%>"><img src="../images/button/system/del_feed.png" border="0" alt="Delete"></a></td>
                    </tr>

                    <%            }
                    %>
                </tbody>
            </table>
    </body>
</html>
